package com.bl.weilan.dao.repository;

import com.bl.weilan.dao.model.TradeChartDetailEntity;
import com.bl.weilan.dao.model.TradeChartEntity;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface TradeChartDetailRepository  extends JpaRepository<TradeChartDetailEntity, String> {

    List<TradeChartDetailEntity> findByChartIdOrderByYear(String chartId);

    List<TradeChartDetailEntity> findByChartIdOrderByValue(String chartId);

    List<TradeChartDetailEntity> findByChartIdOrderByName(String chartId);

    List<TradeChartDetailEntity> findByChartIdAndNameOrderByYear(String chartId, String name);

    TradeChartDetailEntity findByChartIdAndNameAndYear(String chartId, String name, String year);

    // 成立时间
    TradeChartDetailEntity findByChartIdAndName(String chartId, String name);

    // 投资轮次
    TradeChartDetailEntity findByChartIdAndNameAndYear(String chartId, String name, int year);

    // 总估值
    TradeChartDetailEntity findByChartIdAndYear(String chartId, int year);
}
